import java.util.Scanner;
public class Text1 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.println("输入您的卡号");
        int x = sc.nextInt();
        int a = x % 10;
        int b = x /10%10;
        int c = x/100%10;
        int d = x/1000%10;
        int y = a+b+c+d;
        boolean zj = false;
        System.out.println("您卡号的个位数是"+a);
        System.out.println("您卡号的个位数是"+b);
        System.out.println("您卡号的个位数是"+c);
        System.out.println("您卡号的个位数是"+d);
        System.out.println("您的卡号所有数之和"+y);
        if (y%8==0 && a!=8 && b!=8 && c!=8 && d!=8){
            zj = true;
            System.out.println("您是否中奖:"+zj);
        }else{
            System.out.println("您是否中奖:"+zj);
        }
    }
}
